package com.javasm.boot.oauth2.entity;

import lombok.ToString;
import org.springframework.http.HttpStatus;

import java.io.Serializable;

/**
 * Author：MoDebing
 * Version：1.0
 * Date：2022-12-13-12:11
 * Description:
 */
@ToString
public class Response implements Serializable {

    private int code;

    private String msg;

    private Object data;


    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public Object getData() {
        return data;
    }

    public Response data(Object data){
        this.data = data;
        return this;
    }

    public Response msg(String msg){
        this.msg = msg;
        return this;
    }

    public Response code(HttpStatus code){
        this.code = code.value();
        return this;
    }



}
